package sz.szsmk.citizencard.ui.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 首页viewpager适配器
 * Created by qiuling on 2017/8/4.
 */

public class HomePageAdapter extends FragmentPagerAdapter {
    List<Fragment> list;

    public HomePageAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
